package com.ycc.biz.common;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 分页查询基类
 */
@Data
@ApiModel("分页查询参数")
public class PageQuery {
    
    @ApiModelProperty(value = "页码", example = "1")
    private Integer pageNum = 1;
    
    @ApiModelProperty(value = "每页大小", example = "10")
    private Integer pageSize = 10;
    
    /**
     * 构建 MyBatis-Plus 分页对象
     */
    public <T> Page<T> buildPage() {
        return new Page<>(pageNum, pageSize);
    }
} 